home *** CD-ROM | disk | FTP | other *** search
- Path: hevanet.com!usenet
- From: Lefty@hevanet.com (Lefty)
- Newsgroups: comp.lang.c++
- Subject: Help! C++ undef array problem
- Date: 24 Feb 1996 20:16:00 GMT
- Organization: Hevanet Communications
- Message-ID: <4gnrm0$gcq@vista.hevanet.com>
- NNTP-Posting-Host: ke-a7.hevanet.com
- X-Newsreader: WinVN 0.92.6
-
- Help, I'm getting an undefined symbol 'n' error when compiling Sea.cpp (below). Error points to
- int bx[n] in Sea.h
-
- Shouldn't the integer 3 in (*GetModule(),"fish",3) be passed to Sea.cpp and Sea.h
-
- //************************** Lefty.cpp ************************************************************
- #include <owl\applicat.h>
- #include <owl\framewin.h>
- #inclued <owl\dc.h>
- #include Sea.h
-
- class Try : public TFrameWindow
- {
- public:
- Try(TWindow *parent, const char far *title);
- private:
- Sea* Animation
- }:
-
- Try::Try(TWindow *parent, const char far *title) : TFrameWindow(parent, title)
- {
- Animation = new Sea(*GetModule(),"fish",3);
- }
-
-
-
- // *************************** Sea.h *****************************************************************
- class Sea {
- public:
- Sea::Sea(HINSTANCE hInst, char far* name, int n);
- private:
- int bx[n]; };
-
-
-
- // **************************** Sea.cpp **************************************************************
- #include <owl\applicat.h>
- #include <owl\framewin.h>
- #inclued <owl\dc.h>
- #include Sea.h
-
- Sea::Sea(HINSTANCE hInst, char far* name, int n)
- {
- for(int i=1;i<=n;i++) {
- bx[i]= 3 }
- }
-